TextDecorationConfig

data class TextDecorationConfig(val lines: Set<TextDecorationLine> = setOf(TextDecorationLine.NONE), val style: TextDecorationStyle = TextDecorationStyle.SOLID, val underlineColor: Color? = null, val underlineThickness: Float = 1.0f, val underlineOffset: Float = 0.0f, val skipInk: Boolean = true)

Configuration for text decorations on a text range.

All active decoration lines share the same style and thickness. An optional underline color override can be set; overline and strikethrough always use the text color.

Constructors

Link copied to clipboard
constructor(lines: Set<TextDecorationLine> = setOf(TextDecorationLine.NONE), style: TextDecorationStyle = TextDecorationStyle.SOLID, underlineColor: Color? = null, underlineThickness: Float = 1.0f, underlineOffset: Float = 0.0f, skipInk: Boolean = true)

Properties

Link copied to clipboard

the active decoration line types.

Link copied to clipboard
val skipInk: Boolean = true

when true, underlines skip over glyph descenders (skip-ink). Defaults to true.

Link copied to clipboard

the visual style of the decoration lines.

Link copied to clipboard
val underlineColor: Color? = null

optional color override for underlines only. Uses the text color if null. Overline and strikethrough always use the text color.

Link copied to clipboard

relative offset applied to the underline position as a multiplier on the font-default distance. The actual position is computed as fontDefault * (1 + underlineOffset). 0 = font default, positive = proportionally further from baseline, negative = proportionally closer.

Link copied to clipboard

multiplier for the underline thickness.